package com.yangye.otherdemo.mapdemo;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

/**
 * @author yangye
 * @date 2019/7/29
 */
public class MapDemo {

	public static void main(String[] args) {
		System.out.println(UUID.randomUUID().toString());
//		Map<String, String> map = new HashMap<>();
//		map.put("a", "a");
//		System.out.println(map.get("a"));
//
//		String s = map.putIfAbsent("a", "aa");
//		System.out.println(map.get("a"));
	}

	public static Integer[] getIndex(Integer[] nums, Integer target) {
		for (int i = 0; i < nums.length - 1; i++) {
			for (int j = i + 1; j < nums.length; j++) {
				if (nums[i] + nums[j] == target) {
					return new Integer[]{i, j};
				}
			}
		}
		return null;
	}


}
